<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script type="text/javascript">
	//初始化服务节点信息
	$(function(){
		//初始化服务类型
		//处理人类型事件绑定
		$("input[name='scriptType']").change(function(){
			var value = $("input[name='scriptType']:checked").val();
			switch (value) {
			   case "1" :
			       $(".script-class").show();
			       $(".message-class").css("display","none");
			       break;
			   case "2" :
				   $(".message-class").show();
				   $(".script-class").css("display","none");
				   break;
			} 
		});	
	})
</script>
<tr>
	<td class="text-right col-sm-2" style="background-color: #e8e8e8"><strong>服务类型:</strong></td>
	<td class="col-sm-8">
		<input type="radio" name="scriptType" value="1" checked="checked">脚本服务</input>
		<input type="radio" name="scriptType" value="2">抄送服务</input>
	</td>
</tr>
<tr class="script-class">
	<td class="text-right col-sm-2" style="background-color: #e8e8e8"><strong>脚本服务:</strong></td>
	<td class="col-sm-8">
		<input type="text" class="col-sm-5"  id="scriptInfoName" name="scriptInfoName"></input>
		<input type="hidden" id="scriptInfo" name="scriptInfo"></input>
		<input type="button" class="col-sm-1" id="formula" name="formula" onclick="selectFormula('scriptInfo');" value="选择"/>
	</td>
</tr>
<tr class="message-class">
	<td class="text-right col-sm-2" style="background-color:#e8e8e8"><strong>节点处理人:</strong></td>
	<td class="col-sm-8">
		<input type="radio" name="userType" value="1" checked="checked">人员/岗位/部门</input>
		<input type="radio" name="userType" value="2">通用岗位</input>
		<input type="radio" name="userType" value="3">流程变量</input>
	</td>
</tr>
<tr class="message-class">
	<td class="text-right col-sm-2" style="background-color:#e8e8e8"></td>
	<td "col-sm-8">
		<!-- 组织选择 -->
		<div id="userType_user">
			<div class="form-group">
				<div class="col-sm-5">
					<input type="hidden" id="userId" name="userId"/> 
					<div class="input-group">
				      <input type="text" class="form-control" id="userName" name="userName" readonly="readonly"/>
				      <span class="input-group-btn">
				        <button class="btn btn-primary" id="userDialogMultiple" data-dialog="dialog" data-multiple="true" data-idField="userId" data-nameField="userName" data-authType="ALL" type="button">
				        	选择
				        </button>
				      </span>
				    </div>
				</div>
			</div>
		</div>
		<!-- 通用岗位 -->
		<div id="userType_generalPost" style="display:none">
			<div class="form-group  col-sm-12">
				<div class="col-sm-5">
					<input type="hidden" id="generalPostId" name="generalPostId"/> 
					<div class="input-group">
				      <input type="text" class="form-control" id="generalPostName" name="generalPostName" readonly="readonly"/>
				      <span class="input-group-btn">
				        <button class="btn btn-primary" id="userDialogMultiple2" data-dialog="dialog" data-multiple="true" data-idField="generalPostId" data-nameField="generalPostName" data-authType="GENERAL_POST" type="button">
				        	选择
				        </button>
				      </span>
				    </div>
				</div>
			</div>
		</div>
		<!-- 流程变量 -->
		<div id="userType_vars" style="display:none">
			<div id="applicantInfo" style="display:null">
				<div class="form-group col-sm-12">
					<label for="name" class="col-sm-1">变量:</label>
					<div class="col-sm-8">
						<input type="text" class="col-sm-4" id="gPostVarName" name="gPostVarName"></input>
						<input type="hidden" id="gPostVar" name="gPostVar"></input>
						<input type="button" class="col-sm-1" id="formula" name="formula" onclick="selectFormula('gPostVar');" value="选择"/>
					</div>
				</div>
				<div class="form-group col-sm-12">
					<label for="name" class="col-sm-1">变量类型:</label>
					<div class="col-sm-8">
						<input type="radio" name="orgType" value="user" checked="checked">人员</input>
						<input type="radio" name="orgType" value="post">岗位</input>
						<input type="radio" name="orgType" value="dept">部门</input>	
					</div>
				</div>
				<div class="form-group col-sm-12">
					<label for="name" class="col-sm-1">通用岗位:</label>
					<input type="hidden" id="generalPostVarId" name="generalPostVarId"> 
					<div class="col-sm-9">
				      <input type="text" class="col-sm-6" id="generalPostVarName" name="generalPostVarName" readonly="readonly"/>
				      <span class="input-group-btn">
				        <button class="col-sm-2" id="userDialogMultiple3" data-dialog="dialog" data-multiple="true" data-idField="generalPostVarId" data-nameField="generalPostVarName" data-authType="GENERAL_POST" type="button">
				        	选择
				        </button>
				      </span>
				    </div>
				</div>
			</div>
		</div>
	</td>
</tr>
<tr class="message-class">
	<td class="text-right col-sm-2" style="background-color:#e8e8e8"><strong>通知方式:</strong></td>
	<td class="col-sm-8">
		<!-- 
		<ossp:checkbox id="notifyType" name="notifyType" defaultChecked="TODOMESSAGE" dictType="TODO"></ossp:checkbox>
		 -->
		<input type="checkbox" id="notifyType" name="notifyType" checked="checked" value="TODOMESSAGE">代办</input>
	</td>
</tr>
